Bruton's tyrosine kinase (Btk) plays an important role in signal transduction in B cells and is a factor that contributes to the survival, differentiation, proliferation, and activation of B cells. There is currently a need for methods of treating diseases in which B cells or mast cells participate. Btk is also known to participate in mast cell activation and in the physiological functions of platelets. Therefore, Btk inhibitors are effective for the treatment of diseases in which B cells or mast cells participate, for example, allergic diseases, autoimmune diseases, inflammatory diseases, thromboembolic diseases, and cancers.